#pragma once
#include "../../Render/RenderAPI.hpp"
namespace Kriko
{
	class OpenGLRenderAPI : public RenderAPI
	{
	public:
		virtual ~OpenGLRenderAPI() = default;

		virtual void Init() override;
		virtual void SetViewport(uint32_t p_x, uint32_t p_y, uint32_t p_width, uint32_t p_height) override;
		virtual void SetClearColor(const glm::vec4 & p_color) override;
		virtual void SetRenderObject(RenderObject* renderObject) override;
		virtual int SetFrameBufferSize(size_t width, size_t height) override;
		virtual void SetCamera(Camera* p_camera) override;
		virtual void Render() override;
		virtual int FrameBufferRender() override;
		virtual void Clear() override;

	private:
		void AddBufferToVector(class RenderObject*, class OpenGLIndexBuffer*, class OpenGLVertexArray*, class OpenGLTextureBuffer*);
	private:
		std::vector<class RenderObject*> RenderObjects;
		std::vector<class OpenGLIndexBuffer*> IBuffers;
		std::vector<class OpenGLVertexArray*> VBuffers;
		std::vector<class OpenGLTextureBuffer*> TextureBuffers;

		class Camera* pCamera;
		class OpenGLFrameBuffer* pFrameBuffer;
	};
}
